import React from "react";
import { DataAction, IProTableRef } from "vendor/components/pro-table-native";
import { getMenuList } from "../../api";

export const getDataAction = (proTableRef: React.MutableRefObject<IProTableRef>): DataAction => ({
    fetchList: (params) => {
        const { filter } = params;
        return new Promise((resolve, reject) => getMenuList(Object.assign({"menuName": null, "status": null}, filter || {})).then((resp) => resolve(resp.data)).catch((e) => reject(e)))
    },
})


